package com.xspace.android.xafcommon.db;

/**
 * Created by liuchen on 2016/9/14.
 */
public class DBConstants {

    /***
     * Preferences表相关
     */
    public static final String TB_PF = "Preferences";
    public static final String TB_PF_COL_KEY = "key";
    public static final String TB_PF_COL_VALUE = "value";
    public static final String TB_PF_CTEATE_TABLE = "CREATE TABLE " + TB_PF
            + " (" + TB_PF_COL_KEY
            + " text," + TB_PF_COL_VALUE + " text);";
    /***
     * appinfo_msg表相关
     */
    public static final String TB_APP_INFO_MSG = "appinfo_msg";
    public static final String TB_APP_INFO_MSG_COL_APP_PKG = "appPackage";
    public static final String TB_APP_INFO_MSG_COL_APP_INFO = "appInfo";
    public static final String TB_APP_INFO_MSG_CTEATE_TABLE = "CREATE TABLE " + TB_APP_INFO_MSG +
            " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_APP_INFO_MSG_COL_APP_PKG + " CHAR(255)," + TB_APP_INFO_MSG_COL_APP_INFO + " BLOB);";

    /***
     * appinfo表相关
     */
    public static final String TB_APP_INFO = "appinfo_msg";
    public static final String TB_APP_INFO_COL_APP_ID = "app_id";
    public static final String TB_APP_INFO_COL_APP_NAME = "name";
    public static final String TB_APP_INFO_COL_PKG_NAME = "package_name";
    public static final String TB_APP_INFO_COL_ING = "load_integral";
    public static final String TB_APP_INFO_CREATE_TABLE = "CREATE TABLE " + TB_APP_INFO + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," +
            TB_APP_INFO_COL_APP_ID + " text," + TB_APP_INFO_COL_APP_NAME + " text," + TB_APP_INFO_COL_PKG_NAME + " text," + TB_APP_INFO_COL_ING
            + " text);";
    /***
     * menuinfo表相关
     */
    public static final String TB_MENUINFO = "menuinfo";
    public static final String TB_MENUINFO_COL_MENUNAME = "menuName";
    public static final String TB_MENUINFO_COL_PACKAGENAME = "packageName";
    public static final String TB_MENUINFO_COL_MENUIMG = "menuimg";
    public static final String TB_MENUINFO_COL_MENUIMGSELECTED = "menuImgSelected";
    public static final String TB_MENUINFO_COL_MENUURL = "menuurl";
    public static final String TB_MENUINFO_COL_MENUKEY = "menukey";
    public static final String TB_MENUINFO_COL_ISANDROIDAPP = "isAndroidApp";
    public static final String TB_MENUINFO_COL_ISSHOWONHOMEPAGE = "isShowOnHomePage";
    public static final String TB_MENUINFO_COL_ISINSTALL = "isinstall";
    public static final String TB_MENUINFO_COL_DATE = "date";
    public static final String TB_MENUINFO_COL_MENUINDEX = "menuIndex";
    public static final String TB_MENUINFO_COL_SCORE = "score";
    public static final String TB_MENUINFO_CREATE_TABLE = "CREATE TABLE " + TB_MENUINFO
            + " (" + TB_MENUINFO_COL_MENUNAME + " text PRIMARY  KEY,"
            + TB_MENUINFO_COL_PACKAGENAME + " text ,"
            + TB_MENUINFO_COL_MENUIMG + " text,"
            + TB_MENUINFO_COL_MENUIMGSELECTED + " text,"
            + TB_MENUINFO_COL_MENUURL + " text,"
            + TB_MENUINFO_COL_MENUKEY + " text,"
            + TB_MENUINFO_COL_ISANDROIDAPP + " text,"
            + TB_MENUINFO_COL_ISSHOWONHOMEPAGE + " text,"
            + TB_MENUINFO_COL_ISINSTALL + " text,"
            + TB_MENUINFO_COL_DATE + " text,"
            + TB_MENUINFO_COL_MENUINDEX + " text,"
            + TB_MENUINFO_COL_SCORE + " text"
            + ");";
    /***
     * AudioMsgDb表相关
     */
    public static final String TB_AUDIO_MSG = "AudioMsgDb";
    public static final String TB_AUDIO_MSG_COL_AUDIOPATH = "audioPath";
    public static final String TB_AUDIO_MSG_COL_AUDIOURL = "audioUrl";
    public static final String TB_AUDIO_MSG_COL_DOWNTIME = "downTime";
    public static final String TB_AUDIO_MSG_CREATE_TABLE = "create table IF NOT EXISTS " + TB_AUDIO_MSG
            + "(" + "_id INTEGER primary key autoincrement ,"
            + TB_AUDIO_MSG_COL_AUDIOPATH + " varchar(64) ,"
            + TB_AUDIO_MSG_COL_AUDIOURL + " varchar(128) ,"
            + TB_AUDIO_MSG_COL_DOWNTIME + " Long);";

    /***
     * audit_appinfo_msg表相关
     */
    public static final String TB_AUDIT_APPINFO_MSG = "audit_appinfo_msg";
    public static final String TB_AUDIT_APPINFO_MSG_COL_APPINFO = "appInfo";
    public static final String TB_AUDIT_APPINFO_MSG_COL_APPID = "appId";
    public static final String TB_AUDIT_APPINFO_MSG_CREATE_TABLE = "CREATE TABLE " + TB_AUDIT_APPINFO_MSG +
            " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_AUDIT_APPINFO_MSG_COL_APPID + " CHAR(255)," + TB_AUDIT_APPINFO_MSG_COL_APPINFO + " BLOB);";


    /***
     * DraftMsg表相关
     */
    public static final String TB_DRAFT_MSG = "DraftMsg";
    public static final String TB_DRAFT_MSG_COL_MSGID = "msgId";
    public static final String TB_DRAFT_MSG_COL_TOUSERID = "toUserId";
    public static final String TB_DRAFT_MSG_COL_OWNERID = "ownerId";
    public static final String TB_DRAFT_MSG_COL_INSERTTIME = "insertTime";
    public static final String TB_DRAFT_MSG_COL_CONTENT = "content";
    public static final String TB_DRAFT_MSG_COL_TYPE = "msgtype";
    public static final String TB_DRAFT_MSG_CREATE_TABLE = "CREATE TABLE " + TB_DRAFT_MSG
            + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_DRAFT_MSG_COL_INSERTTIME + " integer64,"
            + TB_DRAFT_MSG_COL_MSGID + " text," + TB_DRAFT_MSG_COL_TOUSERID + " text," + TB_DRAFT_MSG_COL_OWNERID + " text,"
            + TB_DRAFT_MSG_COL_TYPE + " integer,"
            + TB_DRAFT_MSG_COL_CONTENT + " text);";
    /***
     * marea表相关
     */
    public static final String TB_MAREA = "marea";
    public static final String TB_MAREA_AID = "aid";
    public static final String TB_MAREA_NAME = "name";
    public static final String TB_MAREA_PARENTCODE = "parentcode";
    public static final String TB_MAREA_ISLEAF = "isLeaf";
    public static final String TB_MAREA_LEVEL = "level";
    public static final String TB_MAREA_CREATE_TABLE = "CREATE TABLE " + TB_MAREA
            + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_MAREA_AID + " text,"
            + TB_MAREA_NAME + " text," + TB_MAREA_PARENTCODE + " text," + TB_MAREA_ISLEAF + " text,"
            + TB_MAREA_LEVEL + " text);";
    /***
     * OfflineDataRecord表相关
     */
    public static final String TB_OFFLINE_DATA_RECORD = "OfflineDataRecord";
    public static final String TB_OFFLINE_DATA_RECORD_KEY = "key";
    public static final String TB_OFFLINE_DATA_RECORD_NAME = "name";
    public static final String TB_OFFLINE_DATA_RECORD_LAST_TIME = "last_time";
    public static final String TB_OFFLINE_DATA_RECORD_STATUS = "status";
    public static final String TB_OFFLINE_DATA_RECORD_SIZE = "size";
    public static final String TB_OFFLINE_DATA_RECORD_PATH = "path";
    public static final String TB_OFFLINE_DATA_RECORD_REMARK1 = "remark1";
    public static final String TB_OFFLINE_DATA_RECORD_REMARK2 = "remark2";
    public static final String TB_OFFLINE_DATA_RECORD_CREATE_TABLE = "CREATE TABLE " + TB_OFFLINE_DATA_RECORD +
            " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_OFFLINE_DATA_RECORD_KEY + " text," + TB_OFFLINE_DATA_RECORD_NAME
            + " text," + TB_OFFLINE_DATA_RECORD_LAST_TIME + " text," + TB_OFFLINE_DATA_RECORD_STATUS + " integer ," + TB_OFFLINE_DATA_RECORD_SIZE + " text," + TB_OFFLINE_DATA_RECORD_PATH
            + " text," + TB_OFFLINE_DATA_RECORD_REMARK1
            + " text," + TB_OFFLINE_DATA_RECORD_REMARK2 + " text);";
    /***
     * OfflineHtml表相关
     */
    public static final String TB_OFFLINE_HTML = "OfflineHtml";
    public static final String TB_OFFLINE_HTML_COL_FORMID = "formid";
    public static final String TB_OFFLINE_HTML_COL_URL = "url";
    public static final String TB_OFFLINE_HTML_COL_CONTENT = "content";
    public static final String TB_OFFLINE_HTML_COL_HTMLBLOB = "htmlblob";
    public static final String TB_OFFLINE_HTML_COL_USER_ID = "user_id";
    public static final String TB_OFFLINE_HTML_COL_URL_TYPE = "url_type";
    public static final String TB_OFFLINE_HTML_COL_FLAG = "flag";
    public static final String TB_OFFLINE_HTML_COL_CID = "cid";
    public static final String TB_OFFLINE_HTML_COL_REMARK1 = "remark1";
    public static final String TB_OFFLINE_HTML_COL_REMARK2 = "remark2";
    public static final String TB_OFFLINE_HTML_COL_REMARK3 = "remark3";
    public static final String TB_OFFLINE_HTML_COL_EDITURL = "editUrl";
    public static final String TB_OFFLINE_HTML_COL_COMMITSTATUS = "commitStatus";
    public static final String TB_OFFLINE_HTML_COL_INSERTTIME = "insertTime";
    public static final String TB_OFFLINE_HTML_COL_FORMNAME = "formname";
    public static final String TB_OFFLINE_HTML_CREATE_TABLE = "CREATE TABLE " + TB_OFFLINE_HTML + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_OFFLINE_HTML_COL_URL + " text,"
            + TB_OFFLINE_HTML_COL_CONTENT + " text," + TB_OFFLINE_HTML_COL_USER_ID + " text," + TB_OFFLINE_HTML_COL_URL_TYPE + " text," + TB_OFFLINE_HTML_COL_EDITURL + " text," + TB_OFFLINE_HTML_COL_COMMITSTATUS
            + " varchar(2)," + TB_OFFLINE_HTML_COL_INSERTTIME + " text," + TB_OFFLINE_HTML_COL_FORMNAME + " text," + TB_OFFLINE_HTML_COL_CID + " text," + TB_OFFLINE_HTML_COL_REMARK1 + " text,"
            + TB_OFFLINE_HTML_COL_REMARK2 + " text," + TB_OFFLINE_HTML_COL_REMARK3 + " text," + TB_OFFLINE_HTML_COL_HTMLBLOB + " blob," + TB_OFFLINE_HTML_COL_FLAG + "   varchar(2)," + TB_OFFLINE_HTML_COL_FORMID
            + " integer64);";

    /***
     * OfflineObject表相关
     */
    public static final String TB_OFFLINE_OBJECT = "OfflineObject";
    public static final String TB_OFFLINE_OBJECT_COL_type = "type";
    public static final String TB_OFFLINE_OBJECT_COL_name = "name";
    public static final String TB_OFFLINE_OBJECT_COL_remark0 = "remark0";
    public static final String TB_OFFLINE_OBJECT_COL_remark1 = "remark1";
    public static final String TB_OFFLINE_OBJECT_COL_workitem = "workitem";
    public static final String TB_OFFLINE_OBJECT_CREATE_TABLE = "CREATE TABLE " + TB_OFFLINE_OBJECT
            + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_OFFLINE_OBJECT_COL_type + " integer,"
            + TB_OFFLINE_OBJECT_COL_name + " text,"
            + TB_OFFLINE_OBJECT_COL_remark0 + " text,"
            + TB_OFFLINE_OBJECT_COL_remark1 + " text,"
            + TB_OFFLINE_OBJECT_COL_workitem + " text);";

    /**
     * OfflinePedingItem表相关
     */
    public static final String TB_CACHEDAIBAN = "CacheDaiBan";
    public static final String TB_CACHEDAIBAN_COL_TYPE = "type";
    public static final String TB_CACHEDAIBAN_COL_USERID = "userid";
    public static final String TB_CACHEDAIBAN_COL_OBJID = "objid";
    public static final String TB_CACHEDAIBAN_COL_ISSELECT = "isselect";
    public static final String TB_CACHEDAIBAN_COL_CONTENT = "content";
    public static final String TB_CACHEDAIBAN_COL_FORMID = "formid";
    public static final String TB_CACHEDAIBAN_COL_INSERTTIME = "inserttime";
    public static final String TB_CACHEDAIBAN_CREATE_TABLE = "CREATE TABLE " + TB_CACHEDAIBAN
            + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT,"
            + TB_CACHEDAIBAN_COL_TYPE + " text,"
            + TB_CACHEDAIBAN_COL_USERID + "  text,"
            + TB_CACHEDAIBAN_COL_OBJID + "  text,"
            + TB_CACHEDAIBAN_COL_ISSELECT + " text,"
            + TB_CACHEDAIBAN_COL_CONTENT + "  text,"
            + TB_CACHEDAIBAN_COL_FORMID + "  text,"
            + TB_CACHEDAIBAN_COL_INSERTTIME + "  text)";
    /**
     * OfflineWorkLog表相关
     */
    public static final String TB_OFFLINE_WORKLOG = "OfflineWorkLog";
    public static final String TB_OFFLINE_WORKLOG_COL_LOGID = "logid";
    public static final String TB_OFFLINE_WORKLOG_COL_JSCONTENT = "jscontent";
    public static final String TB_OFFLINE_WORKLOG_COL_CONTENT = "content";
    public static final String TB_OFFLINE_WORKLOG_COL_OBJECT = "object";
    public static final String TB_OFFLINE_WORKLOG_COL_INSERTTIME = "inserttime";
    public static final String TB_OFFLINE_WORKLOG_COL_REMARK0 = "remark0";
    public static final String TB_OFFLINE_WORKLOG_COL_REMARK1 = "remark1";
    public static final String TB_OFFLINE_WORKLOG_CREATE_TABLE = "CREATE TABLE " + TB_OFFLINE_WORKLOG + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_OFFLINE_WORKLOG_COL_LOGID + " integer64,"
            + TB_OFFLINE_WORKLOG_COL_JSCONTENT + " text," + TB_OFFLINE_WORKLOG_COL_CONTENT + " text," + TB_OFFLINE_WORKLOG_COL_INSERTTIME + " text," + TB_OFFLINE_WORKLOG_COL_REMARK0 + " text," + TB_OFFLINE_WORKLOG_COL_REMARK1
            + " text," + TB_OFFLINE_WORKLOG_COL_OBJECT + " text);";

    /**
     * sort表相关
     */
    public static final String TB_SORT = "sort";
    public static final String TB_SORT_COL_MID = "mid";
    public static final String TB_SORT_COL_NAME = "name";
    public static final String TB_SORT_COL_ISLEAF = "isLeaf";
    public static final String TB_SORT_COL_PID = "pid";
    public static final String TB_SORT_COL_URL = "url";
    public static final String TB_SORT_CREATE_TABLE = "CREATE TABLE " + TB_SORT
            + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT," + TB_SORT_COL_MID
            + " text," + TB_SORT_COL_NAME + " text," + TB_SORT_COL_ISLEAF + " text,"
            + TB_SORT_COL_PID + " text," + TB_SORT_COL_URL + " text);";


}
